100 REM **********************************************************************
110 REM FILE NAME  - SCRNDEMO.BAS
120 REM
130 REM WRITTEN BY - GARY PEEK
140 REM              3201 HIGHGATE
150 REM              ST. CHARLES, MO.  63301
160 REM              314 946-5272
170 REM
180 REM LAST UPDATE - 4/17/89
190 REM
200 REM DESCRIPTION - DEMONSTRATES "SCREEN","VIEW","WINDOW" COMMANDS
210 REM
220 REM PLEASE NOTE - PERMISSION IS GRANTED TO COPY THIS PROGRAM ONLY IF
230 REM               COPIED IN ITS ENTIRETY INCLUDING THIS HEADING.
240 REM
250 REM **********************************************************************
300 SCREEN 0
310 SCREEN ,,1,1:CLS:PRINT "WAIT...":REM PAGE 1 ACTIVE, PAGE 1 VISUAL
320 SCREEN ,,0,1:CLS:REM MAKE PAGE 0 ACTIVE FOR PRINTING WHILE LOOKING AT 1
330 FOR A=1 TO 22
340 PRINT "- DEMONSTRATES FILLING A PAGE THAT IS NOT SEEN AND SWITCHING TO IT"
350 NEXT
360 PRINT:PRINT "HIT ANY KEY..."
370 SCREEN ,,0,0:REM MAKE PAGE 0 THE VISUAL PAGE NOW, ALSO
380 IN$=INKEY$:IF IN$="" THEN 370
390 REM ---------------------------------------------------------------------
400 CLS:SCREEN 2
410 REM ------------------
420 CIRCLE (320,100),100,1
430 LINE (0,0)-(639,199),1
440 LOCATE 2,30:PRINT "DRAW CIRCLE AND LINE WITH NO WINDOW SPECIFIED"
450 LOCATE 3,30:PRINT "HIT ANY KEY..."
460 IN$=INKEY$:IF IN$="" THEN 460
470 REM ----------------------------------------
480 REM MAKE A VIEWPORT SMALLER THEN SCREEN, COLOR 0, BORDER 1
490 VIEW (10,10)-(210,90),0,1
500 REM MAKE WINDOW HAVE REGULAR CO-ORDINATES THAT FIT IN THAT VIEWPORT
510 WINDOW SCREEN (0,0)-(639,199)
520 CIRCLE (320,100),100,1
530 LINE (0,0)-(639,199),1
540 LOCATE 14,3:PRINT "SAME CIRCLE AND LINE-";
550 LOCATE 15,3:PRINT "DIFFERENT WINDOW";
560 LOCATE 16,3:PRINT "HIT ANY KEY..."
570 IN$=INKEY$:IF IN$="" THEN 570
580 REM ----------------------------------------
590 REM MAKE ANOTHER VIEWPORT
600 VIEW (10,100)-(510,160),0,1
610 REM MAKE WINDOW HAVE REGULAR CO-ORDINATES THAT FIT IN THAT VIEWPORT
620 WINDOW SCREEN (0,0)-(639,199)
630 CIRCLE (320,100),100,1
640 LINE (0,0)-(639,199),1
650 LOCATE 9,60:PRINT "SAME CIRCLE & BOX-";
660 LOCATE 10,60:PRINT "DIFFERENT WINDOW";
670 LOCATE 11,60:PRINT "HIT ANY KEY..."
680 IN$=INKEY$:IF IN$="" THEN 680
